﻿using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Kendo.DynamicLinq;
using KPW.Operations.Project.Dto;

namespace KPW.Operations.Project
{
    public interface ITestAppService : IApplicationService
    {
        /// <summary>
        /// 本身kendo列表方法
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        DataSourceResult KendoGetTests(DataSourceRequest input);

        /// <summary>
        ///  无条件获取本身所有数据
        /// </summary>
        /// <returns></returns>
        Task<ListResultOutput<TestListDto>> GetTestsAsync();
        
        /// <summary>
        /// 本身对象删除方法
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task DeleteTest(IdInput input);
        
        /// <summary>
        /// 本身对象插入与更新方法
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateOrUpdateTest(CreateOrUpdateTestInput input);
        
        /// <summary>
        ///  新增一条本身对象数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateTestAsync(CreateOrUpdateTestInput input);
        
        /// <summary>
        /// 更新一条本身对象数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateTestAsync(CreateOrUpdateTestInput input);
        
        /// <summary>
        /// 更新加载前数据本身对象
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<GetTestForEditOutput> GetTestForEdit(NullableIdInput input);
        
        /// <summary>
        ///        
        ///根据id查看单条记录(加载或者详情显示外键)
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ListResultOutput<TestListDto>> GetTestsByID(IdInput input);
    }
}